package java6681.lesson11;

public class Person6681 {
    private String name;
    private char sex;

    public Person6681() {

    }

    public Person6681(String name, char sex) {
        super();
        this.name = name;
        this.sex = sex;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        if (sex == '男' || sex == '女') {
            this.sex = sex;
        } else {
            this.sex = '男';
        }
    }

    public void go(String where) {
        System.out.printf("%s(%c)到达%s\n", name, sex, where);
    }

}
